from django.conf.urls import url
from rest_framework_jwt.views import ObtainJSONWebToken

from users import views



urlpatterns = [
url(r'^username/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),

url(r'^mobile/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view()),
url(r'^users/$', views.UserView.as_view()),
url(r'^authorizations/$', ObtainJSONWebToken.as_view()),

]
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('addresses', views.AddressViewSet, base_name='addresses')

urlpatterns += router.urls
